import request from '@/util/request'
import { dealOpts, FINANCE, FIRM_FINANCE } from './../api_type'

// finance
const linkGetStaffKpis = (params, opts) => {
  return request.get(dealOpts(FINANCE + '/getStaffKpis', opts), params)
}

const linkSetStaffKpiq = (params, opts) => {
  return request.get(dealOpts(FINANCE + '/setStaffKpi', opts), params)
}

const linkGetStaffKpByMonth = (params, opts) => {
  return request.get(dealOpts(FIRM_FINANCE + '/getStaffKpByMonth', opts), params)
}

const linkGetStaffKpByPeriod = (params, opts) => {
  return request.get(dealOpts(FIRM_FINANCE + '/getStaffKpByPeriod', opts), params)
}

const linkGetStaffKpDetail = (params, opts) => {
  return request.get(dealOpts(FIRM_FINANCE + '/getStaffKpDetail', opts), params)
}

export default {
  linkGetStaffKpis,
  linkSetStaffKpiq,
  linkGetStaffKpByMonth,
  linkGetStaffKpByPeriod,
  linkGetStaffKpDetail
}
